<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>HTTP::Tiny - A small, simple, correct HTTP/1.1 client - Perldoc Browser</title>
    <link rel="search" href="https://perldoc.perl.org/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser">
    <link rel="canonical" href="https://perldoc.perl.org/HTTP::Tiny">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" />
    <style>
      body {
        background: #f4f4f5;
        color: #020202;
      }
      .navbar-dark {
        background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0);
        background-repeat: repeat-x;
      }
      .navbar-dark .navbar-nav .nav-link,
      .navbar-dark .navbar-nav .nav-link:focus { color: #fff }
      .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 }
      #wrapperlicious {
        margin: 0 auto;
        font: 0.9em 'Helvetica Neue', Helvetica, sans-serif;
        font-weight: normal;
        line-height: 1.5em;
        margin: 0;
        padding: 0;
      }
      #wrapperlicious h1 { font-size: 1.5em }
      #wrapperlicious h2 { font-size: 1.3em }
      #wrapperlicious h3 { font-size: 1.1em }
      #wrapperlicious h4 { font-size: 0.9em }
      #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3,
      #wrapperlicious h4, #wrapperlicious dt {
        color: #020202;
        margin-top: 1em;
        margin-bottom: 1em;
        position: relative;
        font-weight: bold;
      }
      #wrapperlicious a { color: inherit; text-decoration: underline }
      #wrapperlicious #toc { text-decoration: none }
      #wrapperlicious a:hover { color: #2a2a2a }
      #wrapperlicious a img { border: 0 }
      #wrapperlicious :not(pre) > code {
        color: inherit;
        background-color: rgba(0, 0, 0, 0.04);
        border-radius: 3px;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        padding: 0.3em;
      }
      #wrapperlicious dd {
        margin: 0;
        margin-left: 2em;
      }
      #wrapperlicious dt {
        color: #2a2a2a;
        font-weight: bold;
        margin-left: 0.9em;
      }
      #wrapperlicious p {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious li > p {
        margin-bottom: 0;
        margin-top: 0;
      }
      #wrapperlicious pre {
        border: 1px solid #c1c1c1;
        border-radius: 3px;
        font: 100% Consolas, Menlo, Monaco, monospace;
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious pre > code {
        display: block;
        background-color: #f6f6f6;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        line-height: 1.5em;
        text-align: left;
        white-space: pre;
        padding: 1em;
      }
      #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious ul {
        list-style-type: square;
      }
      #wrapperlicious ul ul {
        margin-bottom: 0px;
        margin-top: 0px;
      }
      #footer {
        font-size: 0.8em;
        padding-top: 0.5em;
        text-align: center;
      }
      #more {
        display: inline;
        font-size: 0.8em;
      }
      #perldocdiv {
        background-color: #fff;
        border: 1px solid #c1c1c1;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        margin-left: auto;
        margin-right: auto;
        padding: 3em;
        padding-top: 1em;
        max-width: 960px;
      }
      #moduleversion { float: right }
      #wrapperlicious .leading-notice {
        font-style: italic;
        padding-left: 1em;
        margin-top: 1em;
        margin-bottom: 1em;
      }
      #wrapperlicious .permalink {
        display: none;
        left: -0.75em;
        position: absolute;
        padding-right: 0.25em;
        text-decoration: none;
      }
      #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink,
      #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink,
      #wrapperlicious dt:hover .permalink {
        display: block;
      }
    </style>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'G-KVNWBNT5FB');
      gtag('config', 'UA-50555-3');
    </script>
  </head>
  <body>
    <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between">
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <a class="navbar-brand" href="https://perldoc.perl.org/">Perldoc Browser</a>
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./HTTP::Tiny.html#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.35.0</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-stable">
          <a class="dropdown-item" href="https://perldoc.perl.org/HTTP::Tiny">Latest</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.2/HTTP::Tiny">5.38.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.1/HTTP::Tiny">5.38.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0/HTTP::Tiny">5.38.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.3/HTTP::Tiny">5.36.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.2/HTTP::Tiny">5.36.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.1/HTTP::Tiny">5.36.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.0/HTTP::Tiny">5.36.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.3/HTTP::Tiny">5.34.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.2/HTTP::Tiny">5.34.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.1/HTTP::Tiny">5.34.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.0/HTTP::Tiny">5.34.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.1/HTTP::Tiny">5.32.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.0/HTTP::Tiny">5.32.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.3/HTTP::Tiny">5.30.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.2/HTTP::Tiny">5.30.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.1/HTTP::Tiny">5.30.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.0/HTTP::Tiny">5.30.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.3/HTTP::Tiny">5.28.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.2/HTTP::Tiny">5.28.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.1/HTTP::Tiny">5.28.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.0/HTTP::Tiny">5.28.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.3/HTTP::Tiny">5.26.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.2/HTTP::Tiny">5.26.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.1/HTTP::Tiny">5.26.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.0/HTTP::Tiny">5.26.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.4/HTTP::Tiny">5.24.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.3/HTTP::Tiny">5.24.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.2/HTTP::Tiny">5.24.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.1/HTTP::Tiny">5.24.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.0/HTTP::Tiny">5.24.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.4/HTTP::Tiny">5.22.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.3/HTTP::Tiny">5.22.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.2/HTTP::Tiny">5.22.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.1/HTTP::Tiny">5.22.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.0/HTTP::Tiny">5.22.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.3/HTTP::Tiny">5.20.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.2/HTTP::Tiny">5.20.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.1/HTTP::Tiny">5.20.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.0/HTTP::Tiny">5.20.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.4/HTTP::Tiny">5.18.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.3/HTTP::Tiny">5.18.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.2/HTTP::Tiny">5.18.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.1/HTTP::Tiny">5.18.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.0/HTTP::Tiny">5.18.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.3/HTTP::Tiny">5.16.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.2/HTTP::Tiny">5.16.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.1/HTTP::Tiny">5.16.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.0/HTTP::Tiny">5.16.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.4/HTTP::Tiny">5.14.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.3/HTTP::Tiny">5.14.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.2/HTTP::Tiny">5.14.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.1/HTTP::Tiny">5.14.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.0/HTTP::Tiny">5.14.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.5/HTTP::Tiny">5.12.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.4/HTTP::Tiny">5.12.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.3/HTTP::Tiny">5.12.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.2/HTTP::Tiny">5.12.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.1/HTTP::Tiny">5.12.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.0/HTTP::Tiny">5.12.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.1/HTTP::Tiny">5.10.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.0/HTTP::Tiny">5.10.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.9/HTTP::Tiny">5.8.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.8/HTTP::Tiny">5.8.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.7/HTTP::Tiny">5.8.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.6/HTTP::Tiny">5.8.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.5/HTTP::Tiny">5.8.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.4/HTTP::Tiny">5.8.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.3/HTTP::Tiny">5.8.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.2/HTTP::Tiny">5.8.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.1/HTTP::Tiny">5.8.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.0/HTTP::Tiny">5.8.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.2/HTTP::Tiny">5.6.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.1/HTTP::Tiny">5.6.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.0/HTTP::Tiny">5.6.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_04/HTTP::Tiny">5.005_04</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_03/HTTP::Tiny">5.005_03</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_02/HTTP::Tiny">5.005_02</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_01/HTTP::Tiny">5.005_01</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005/HTTP::Tiny">5.005</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./HTTP::Tiny.html#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-dev">
          <a class="dropdown-item" href="https://perldoc.perl.org/blead/HTTP::Tiny">blead</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.6/HTTP::Tiny">5.39.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.5/HTTP::Tiny">5.39.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.4/HTTP::Tiny">5.39.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.3/HTTP::Tiny">5.39.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.2/HTTP::Tiny">5.39.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.1/HTTP::Tiny">5.39.1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC2/HTTP::Tiny">5.38.0-RC2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC1/HTTP::Tiny">5.38.0-RC1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.11/HTTP::Tiny">5.37.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.10/HTTP::Tiny">5.37.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.9/HTTP::Tiny">5.37.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.8/HTTP::Tiny">5.37.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.7/HTTP::Tiny">5.37.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.6/HTTP::Tiny">5.37.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.5/HTTP::Tiny">5.37.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.4/HTTP::Tiny">5.37.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.3/HTTP::Tiny">5.37.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.2/HTTP::Tiny">5.37.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.1/HTTP::Tiny">5.37.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.0/HTTP::Tiny">5.37.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.11/HTTP::Tiny">5.35.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.10/HTTP::Tiny">5.35.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.9/HTTP::Tiny">5.35.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.8/HTTP::Tiny">5.35.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.7/HTTP::Tiny">5.35.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.6/HTTP::Tiny">5.35.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.5/HTTP::Tiny">5.35.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.4/HTTP::Tiny">5.35.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.3/HTTP::Tiny">5.35.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.2/HTTP::Tiny">5.35.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.1/HTTP::Tiny">5.35.1</a>
          <a class="dropdown-item active" href="./HTTP::Tiny.html">5.35.0</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./HTTP::Tiny.html#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-nav">
          <a class="dropdown-item" href="perl.html">Perl</a>
          <a class="dropdown-item" href="perlintro.html">Intro</a>
          <a class="dropdown-item" href="perl.html#Tutorials">Tutorials</a>
          <a class="dropdown-item" href="perlfaq.html">FAQs</a>
          <a class="dropdown-item" href="perl.html#Reference-Manual">Reference</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlop.html">Operators</a>
          <a class="dropdown-item" href="functions.html">Functions</a>
          <a class="dropdown-item" href="variables.html">Variables</a>
          <a class="dropdown-item" href="modules.html">Modules</a>
          <a class="dropdown-item" href="perlutil.html">Utilities</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlcommunity.html">Community</a>
          <a class="dropdown-item" href="perlhist.html">History</a>
        </div>
      </li>
    </ul>
    <ul class="navbar-nav">
      <script>
        function set_expand (expand) {
          var perldocdiv = document.getElementById('perldocdiv');
          var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width');
          var expanded = (width == '' || width == 'none') ? true : false;
          if (expand === null) {
            expand = !expanded;
          }
          if ((expand && !expanded) || (!expand && expanded)) {
            perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px');
            var button_classlist = document.getElementById('content-expand-button').classList;
            if (expand) {
              button_classlist.add('btn-light');
              button_classlist.remove('btn-outline-light');
            } else {
              button_classlist.add('btn-outline-light');
              button_classlist.remove('btn-light');
            }
          }
          return expand;
        }
        function toggle_expand () {
          var expand = set_expand(null);
          document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC';
        }
        function read_expand () {
          return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 });
        }
        if (document.readyState === 'loading') {
          document.addEventListener('DOMContentLoaded', function () {
            if (read_expand()) {
              set_expand(true);
            }
          });
        } else if (read_expand()) {
          set_expand(true);
        }
      </script>
      <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-2" onclick="toggle_expand()">Expand</button>
    <ul>
    <form class="form-inline" method="get" action="https://perldoc.perl.org/5.35.0/search">
      <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search">
    </form>
  </div>
</nav>

    <div id="wrapperlicious" class="container-fluid">
      <div id="perldocdiv">
        <div id="links">
          <a href="./HTTP::Tiny.html">HTTP::Tiny</a>
          <div id="more">
            (<a href="./HTTP::Tiny.txt">source</a>,
            <a href="https://metacpan.org/pod/HTTP::Tiny">CPAN</a>)
          </div>
            <div id="moduleversion">version 0.076</div>
        </div>
        <div class="leading-notice">
          You are viewing the version of this documentation from Perl 5.35.0.
            This is a development version of Perl.
        </div>
        <h1><a id="toc">CONTENTS</a></h1>
                  <ul>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#NAME">NAME</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#VERSION">VERSION</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#SYNOPSIS">SYNOPSIS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#DESCRIPTION">DESCRIPTION</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#METHODS">METHODS</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#new">new</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#get%7Chead%7Cput%7Cpost%7Cdelete">get|head|put|post|delete</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#post_form">post_form</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#mirror">mirror</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#request">request</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#www_form_urlencode">www_form_urlencode</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#can_ssl">can_ssl</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#connected">connected</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#SSL-SUPPORT">SSL SUPPORT</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#PROXY-SUPPORT">PROXY SUPPORT</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#LIMITATIONS">LIMITATIONS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#SEE-ALSO">SEE ALSO</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#SUPPORT">SUPPORT</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#Bugs-/-Feature-Requests">Bugs / Feature Requests</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#Source-Code">Source Code</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#AUTHORS">AUTHORS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#CONTRIBUTORS">CONTRIBUTORS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./HTTP::Tiny.html#COPYRIGHT-AND-LICENSE">COPYRIGHT AND LICENSE</a>
              </li>
          </ul>

      <h1 id="NAME"><a class="permalink" href="./HTTP::Tiny.html#NAME">#</a>NAME</h1>

<p>HTTP::Tiny - A small, simple, correct HTTP/1.1 client</p>

<h1 id="VERSION"><a class="permalink" href="./HTTP::Tiny.html#VERSION">#</a>VERSION</h1>

<p>version 0.076</p>

<h1 id="SYNOPSIS"><a class="permalink" href="./HTTP::Tiny.html#SYNOPSIS">#</a>SYNOPSIS</h1>

<pre><code>use HTTP::Tiny;

my $response = HTTP::Tiny-&gt;new-&gt;get(&#39;http://example.com/&#39;);

die &quot;Failed!\n&quot; unless $response-&gt;{success};

print &quot;$response-&gt;{status} $response-&gt;{reason}\n&quot;;

while (my ($k, $v) = each %{$response-&gt;{headers}}) {
    for (ref $v eq &#39;ARRAY&#39; ? @$v : $v) {
        print &quot;$k: $_\n&quot;;
    }
}

print $response-&gt;{content} if length $response-&gt;{content};</code></pre>

<h1 id="DESCRIPTION"><a class="permalink" href="./HTTP::Tiny.html#DESCRIPTION">#</a>DESCRIPTION</h1>

<p>This is a very simple HTTP/1.1 client, designed for doing simple requests without the overhead of a large framework like <a href="./LWP::UserAgent.html">LWP::UserAgent</a>.</p>

<p>It is more correct and more complete than <a href="./HTTP::Lite.html">HTTP::Lite</a>. It supports proxies and redirection. It also correctly resumes after EINTR.</p>

<p>If <a href="./IO::Socket::IP.html">IO::Socket::IP</a> 0.25 or later is installed, HTTP::Tiny will use it instead of <a href="./IO::Socket::INET.html">IO::Socket::INET</a> for transparent support for both IPv4 and IPv6.</p>

<p>Cookie support requires <a href="./HTTP::CookieJar.html">HTTP::CookieJar</a> or an equivalent class.</p>

<h1 id="METHODS"><a class="permalink" href="./HTTP::Tiny.html#METHODS">#</a>METHODS</h1>

<h2 id="new"><a class="permalink" href="./HTTP::Tiny.html#new">#</a>new</h2>

<pre><code>$http = HTTP::Tiny-&gt;new( %attributes );</code></pre>

<p>This constructor returns a new HTTP::Tiny object. Valid attributes include:</p>

<ul>

<li><p><code>agent</code> — A user-agent string (defaults to &#39;HTTP-Tiny/$VERSION&#39;). If <code>agent</code> — ends in a space character, the default user-agent string is appended.</p>

</li>
<li><p><code>cookie_jar</code> — An instance of <a href="./HTTP::CookieJar.html">HTTP::CookieJar</a> — or equivalent class that supports the <code>add</code> and <code>cookie_header</code> methods</p>

</li>
<li><p><code>default_headers</code> — A hashref of default headers to apply to requests</p>

</li>
<li><p><code>local_address</code> — The local IP address to bind to</p>

</li>
<li><p><code>keep_alive</code> — Whether to reuse the last connection (if for the same scheme, host and port) (defaults to 1)</p>

</li>
<li><p><code>max_redirect</code> — Maximum number of redirects allowed (defaults to 5)</p>

</li>
<li><p><code>max_size</code> — Maximum response size in bytes (only when not using a data callback). If defined, responses larger than this will return an exception.</p>

</li>
<li><p><code>http_proxy</code> — URL of a proxy server to use for HTTP connections (default is <code>$ENV{http_proxy}</code> — if set)</p>

</li>
<li><p><code>https_proxy</code> — URL of a proxy server to use for HTTPS connections (default is <code>$ENV{https_proxy}</code> — if set)</p>

</li>
<li><p><code>proxy</code> — URL of a generic proxy server for both HTTP and HTTPS connections (default is <code>$ENV{all_proxy}</code> — if set)</p>

</li>
<li><p><code>no_proxy</code> — List of domain suffixes that should not be proxied. Must be a comma-separated string or an array reference. (default is <code>$ENV{no_proxy}</code> —)</p>

</li>
<li><p><code>timeout</code> — Request timeout in seconds (default is 60) If a socket open, read or write takes longer than the timeout, an exception is thrown.</p>

</li>
<li><p><code>verify_SSL</code> — A boolean that indicates whether to validate the SSL certificate of an <code>https</code> — connection (default is false)</p>

</li>
<li><p><code>SSL_options</code> — A hashref of <code>SSL_*</code> — options to pass through to <a href="./IO::Socket::SSL.html">IO::Socket::SSL</a></p>

</li>
</ul>

<p>Passing an explicit <code>undef</code> for <code>proxy</code>, <code>http_proxy</code> or <code>https_proxy</code> will prevent getting the corresponding proxies from the environment.</p>

<p>Exceptions from <code>max_size</code>, <code>timeout</code> or other errors will result in a pseudo-HTTP status code of 599 and a reason of &quot;Internal Exception&quot;. The content field in the response will contain the text of the exception.</p>

<p>The <code>keep_alive</code> parameter enables a persistent connection, but only to a single destination scheme, host and port. Also, if any connection-relevant attributes are modified, or if the process ID or thread ID change, the persistent connection will be dropped. If you want persistent connections across multiple destinations, use multiple HTTP::Tiny objects.</p>

<p>See <a href="./HTTP::Tiny.html#SSL-SUPPORT">&quot;SSL SUPPORT&quot;</a> for more on the <code>verify_SSL</code> and <code>SSL_options</code> attributes.</p>

<h2 id="get|head|put|post|delete"><a class="permalink" href="./HTTP::Tiny.html#get%7Chead%7Cput%7Cpost%7Cdelete">#</a><a id="get"></a><a id="get-head-put-post-delete"></a>get|head|put|post|delete</h2>

<pre><code>$response = $http-&gt;get($url);
$response = $http-&gt;get($url, \%options);
$response = $http-&gt;head($url);</code></pre>

<p>These methods are shorthand for calling <code>request()</code> for the given method. The URL must have unsafe characters escaped and international domain names encoded. See <code>request()</code> for valid options and a description of the response.</p>

<p>The <code>success</code> field of the response will be true if the status code is 2XX.</p>

<h2 id="post_form"><a class="permalink" href="./HTTP::Tiny.html#post_form">#</a>post_form</h2>

<pre><code>$response = $http-&gt;post_form($url, $form_data);
$response = $http-&gt;post_form($url, $form_data, \%options);</code></pre>

<p>This method executes a <code>POST</code> request and sends the key/value pairs from a form data hash or array reference to the given URL with a <code>content-type</code> of <code>application/x-www-form-urlencoded</code>. If data is provided as an array reference, the order is preserved; if provided as a hash reference, the terms are sorted on key and value for consistency. See documentation for the <code>www_form_urlencode</code> method for details on the encoding.</p>

<p>The URL must have unsafe characters escaped and international domain names encoded. See <code>request()</code> for valid options and a description of the response. Any <code>content-type</code> header or content in the options hashref will be ignored.</p>

<p>The <code>success</code> field of the response will be true if the status code is 2XX.</p>

<h2 id="mirror"><a class="permalink" href="./HTTP::Tiny.html#mirror">#</a>mirror</h2>

<pre><code>$response = $http-&gt;mirror($url, $file, \%options)
if ( $response-&gt;{success} ) {
    print &quot;$file is up to date\n&quot;;
}</code></pre>

<p>Executes a <code>GET</code> request for the URL and saves the response body to the file name provided. The URL must have unsafe characters escaped and international domain names encoded. If the file already exists, the request will include an <code>If-Modified-Since</code> header with the modification timestamp of the file. You may specify a different <code>If-Modified-Since</code> header yourself in the <code>$options-&gt;{headers}</code> hash.</p>

<p>The <code>success</code> field of the response will be true if the status code is 2XX or if the status code is 304 (unmodified).</p>

<p>If the file was modified and the server response includes a properly formatted <code>Last-Modified</code> header, the file modification time will be updated accordingly.</p>

<h2 id="request"><a class="permalink" href="./HTTP::Tiny.html#request">#</a>request</h2>

<pre><code>$response = $http-&gt;request($method, $url);
$response = $http-&gt;request($method, $url, \%options);</code></pre>

<p>Executes an HTTP request of the given method type (&#39;GET&#39;, &#39;HEAD&#39;, &#39;POST&#39;, &#39;PUT&#39;, etc.) on the given URL. The URL must have unsafe characters escaped and international domain names encoded.</p>

<p><b>NOTE</b>: Method names are <b>case-sensitive</b> per the HTTP/1.1 specification. Don&#39;t use <code>get</code> when you really want <code>GET</code>. See <a href="https://perldoc.perl.org/5.35.0/LIMITATIONS">LIMITATIONS</a> for how this applies to redirection.</p>

<p>If the URL includes a &quot;user:password&quot; stanza, they will be used for Basic-style authorization headers. (Authorization headers will not be included in a redirected request.) For example:</p>

<pre><code>$http-&gt;request(&#39;GET&#39;, &#39;http://Aladdin:open sesame@example.com/&#39;);</code></pre>

<p>If the &quot;user:password&quot; stanza contains reserved characters, they must be percent-escaped:</p>

<pre><code>$http-&gt;request(&#39;GET&#39;, &#39;http://john%40example.com:password@example.com/&#39;);</code></pre>

<p>A hashref of options may be appended to modify the request.</p>

<p>Valid options are:</p>

<ul>

<li><p><code>headers</code> — A hashref containing headers to include with the request. If the value for a header is an array reference, the header will be output multiple times with each value in the array. These headers over-write any default headers.</p>

</li>
<li><p><code>content</code> — A scalar to include as the body of the request OR a code reference that will be called iteratively to produce the body of the request</p>

</li>
<li><p><code>trailer_callback</code> — A code reference that will be called if it exists to provide a hashref of trailing headers (only used with chunked transfer-encoding)</p>

</li>
<li><p><code>data_callback</code> — A code reference that will be called for each chunks of the response body received.</p>

</li>
<li><p><code>peer</code> — Override host resolution and force all connections to go only to a specific peer address, regardless of the URL of the request. This will include any redirections! This options should be used with extreme caution (e.g. debugging or very special circumstances). It can be given as either a scalar or a code reference that will receive the hostname and whose response will be taken as the address.</p>

</li>
</ul>

<p>The <code>Host</code> header is generated from the URL in accordance with RFC 2616. It is a fatal error to specify <code>Host</code> in the <code>headers</code> option. Other headers may be ignored or overwritten if necessary for transport compliance.</p>

<p>If the <code>content</code> option is a code reference, it will be called iteratively to provide the content body of the request. It should return the empty string or undef when the iterator is exhausted.</p>

<p>If the <code>content</code> option is the empty string, no <code>content-type</code> or <code>content-length</code> headers will be generated.</p>

<p>If the <code>data_callback</code> option is provided, it will be called iteratively until the entire response body is received. The first argument will be a string containing a chunk of the response body, the second argument will be the in-progress response hash reference, as described below. (This allows customizing the action of the callback based on the <code>status</code> or <code>headers</code> received prior to the content body.)</p>

<p>The <code>request</code> method returns a hashref containing the response. The hashref will have the following keys:</p>

<ul>

<li><p><code>success</code> — Boolean indicating whether the operation returned a 2XX status code</p>

</li>
<li><p><code>url</code> — URL that provided the response. This is the URL of the request unless there were redirections, in which case it is the last URL queried in a redirection chain</p>

</li>
<li><p><code>status</code> — The HTTP status code of the response</p>

</li>
<li><p><code>reason</code> — The response phrase returned by the server</p>

</li>
<li><p><code>content</code> — The body of the response. If the response does not have any content or if a data callback is provided to consume the response body, this will be the empty string</p>

</li>
<li><p><code>headers</code> — A hashref of header fields. All header field names will be normalized to be lower case. If a header is repeated, the value will be an arrayref; it will otherwise be a scalar string containing the value</p>

</li>
<li><p><code>protocol</code> - If this field exists, it is the protocol of the response such as HTTP/1.0 or HTTP/1.1</p>

</li>
<li><p><code>redirects</code> If this field exists, it is an arrayref of response hash references from redirects in the same order that redirections occurred. If it does not exist, then no redirections occurred.</p>

</li>
</ul>

<p>On an exception during the execution of the request, the <code>status</code> field will contain 599, and the <code>content</code> field will contain the text of the exception.</p>

<h2 id="www_form_urlencode"><a class="permalink" href="./HTTP::Tiny.html#www_form_urlencode">#</a>www_form_urlencode</h2>

<pre><code>$params = $http-&gt;www_form_urlencode( $data );
$response = $http-&gt;get(&quot;http://example.com/query?$params&quot;);</code></pre>

<p>This method converts the key/value pairs from a data hash or array reference into a <code>x-www-form-urlencoded</code> string. The keys and values from the data reference will be UTF-8 encoded and escaped per RFC 3986. If a value is an array reference, the key will be repeated with each of the values of the array reference. If data is provided as a hash reference, the key/value pairs in the resulting string will be sorted by key and value for consistent ordering.</p>

<h2 id="can_ssl"><a class="permalink" href="./HTTP::Tiny.html#can_ssl">#</a>can_ssl</h2>

<pre><code>$ok         = HTTP::Tiny-&gt;can_ssl;
($ok, $why) = HTTP::Tiny-&gt;can_ssl;
($ok, $why) = $http-&gt;can_ssl;</code></pre>

<p>Indicates if SSL support is available. When called as a class object, it checks for the correct version of <a href="./Net::SSLeay.html">Net::SSLeay</a> and <a href="./IO::Socket::SSL.html">IO::Socket::SSL</a>. When called as an object methods, if <code>SSL_verify</code> is true or if <code>SSL_verify_mode</code> is set in <code>SSL_options</code>, it checks that a CA file is available.</p>

<p>In scalar context, returns a boolean indicating if SSL is available. In list context, returns the boolean and a (possibly multi-line) string of errors indicating why SSL isn&#39;t available.</p>

<h2 id="connected"><a class="permalink" href="./HTTP::Tiny.html#connected">#</a>connected</h2>

<pre><code>$host = $http-&gt;connected;
($host, $port) = $http-&gt;connected;</code></pre>

<p>Indicates if a connection to a peer is being kept alive, per the <code>keep_alive</code> option.</p>

<p>In scalar context, returns the peer host and port, joined with a colon, or <code>undef</code> (if no peer is connected). In list context, returns the peer host and port or an empty list (if no peer is connected).</p>

<p><b>Note</b>: This method cannot reliably be used to discover whether the remote host has closed its end of the socket.</p>

<h1 id="SSL-SUPPORT"><a class="permalink" href="./HTTP::Tiny.html#SSL-SUPPORT">#</a><a id="SSL"></a>SSL SUPPORT</h1>

<p>Direct <code>https</code> connections are supported only if <a href="./IO::Socket::SSL.html">IO::Socket::SSL</a> 1.56 or greater and <a href="./Net::SSLeay.html">Net::SSLeay</a> 1.49 or greater are installed. An exception will be thrown if new enough versions of these modules are not installed or if the SSL encryption fails. You can also use <code>HTTP::Tiny::can_ssl()</code> utility function that returns boolean to see if the required modules are installed.</p>

<p>An <code>https</code> connection may be made via an <code>http</code> proxy that supports the CONNECT command (i.e. RFC 2817). You may not proxy <code>https</code> via a proxy that itself requires <code>https</code> to communicate.</p>

<p>SSL provides two distinct capabilities:</p>

<ul>

<li><p>Encrypted communication channel</p>

</li>
<li><p>Verification of server identity</p>

</li>
</ul>

<p><b>By default, HTTP::Tiny does not verify server identity</b>.</p>

<p>Server identity verification is controversial and potentially tricky because it depends on a (usually paid) third-party Certificate Authority (CA) trust model to validate a certificate as legitimate. This discriminates against servers with self-signed certificates or certificates signed by free, community-driven CA&#39;s such as <a href="http://cacert.org">CAcert.org</a>.</p>

<p>By default, HTTP::Tiny does not make any assumptions about your trust model, threat level or risk tolerance. It just aims to give you an encrypted channel when you need one.</p>

<p>Setting the <code>verify_SSL</code> attribute to a true value will make HTTP::Tiny verify that an SSL connection has a valid SSL certificate corresponding to the host name of the connection and that the SSL certificate has been verified by a CA. Assuming you trust the CA, this will protect against a <a href="http://en.wikipedia.org/wiki/Man-in-the-middle_attack">man-in-the-middle attack</a>. If you are concerned about security, you should enable this option.</p>

<p>Certificate verification requires a file containing trusted CA certificates.</p>

<p>If the environment variable <code>SSL_CERT_FILE</code> is present, HTTP::Tiny will try to find a CA certificate file in that location.</p>

<p>If the <a href="./Mozilla::CA.html">Mozilla::CA</a> module is installed, HTTP::Tiny will use the CA file included with it as a source of trusted CA&#39;s. (This means you trust Mozilla, the author of Mozilla::CA, the CPAN mirror where you got Mozilla::CA, the toolchain used to install it, and your operating system security, right?)</p>

<p>If that module is not available, then HTTP::Tiny will search several system-specific default locations for a CA certificate file:</p>

<ul>

<li><p>/etc/ssl/certs/ca-certificates.crt</p>

</li>
<li><p>/etc/pki/tls/certs/ca-bundle.crt</p>

</li>
<li><p>/etc/ssl/ca-bundle.pem</p>

</li>
</ul>

<p>An exception will be raised if <code>verify_SSL</code> is true and no CA certificate file is available.</p>

<p>If you desire complete control over SSL connections, the <code>SSL_options</code> attribute lets you provide a hash reference that will be passed through to <code>IO::Socket::SSL::start_SSL()</code>, overriding any options set by HTTP::Tiny. For example, to provide your own trusted CA file:</p>

<pre><code>SSL_options =&gt; {
    SSL_ca_file =&gt; $file_path,
}</code></pre>

<p>The <code>SSL_options</code> attribute could also be used for such things as providing a client certificate for authentication to a server or controlling the choice of cipher used for the SSL connection. See <a href="./IO::Socket::SSL.html">IO::Socket::SSL</a> documentation for details.</p>

<h1 id="PROXY-SUPPORT"><a class="permalink" href="./HTTP::Tiny.html#PROXY-SUPPORT">#</a><a id="PROXY"></a>PROXY SUPPORT</h1>

<p>HTTP::Tiny can proxy both <code>http</code> and <code>https</code> requests. Only Basic proxy authorization is supported and it must be provided as part of the proxy URL: <code>http://user:pass@proxy.example.com/</code>.</p>

<p>HTTP::Tiny supports the following proxy environment variables:</p>

<ul>

<li><p>http_proxy or HTTP_PROXY</p>

</li>
<li><p>https_proxy or HTTPS_PROXY</p>

</li>
<li><p>all_proxy or ALL_PROXY</p>

</li>
</ul>

<p>If the <code>REQUEST_METHOD</code> environment variable is set, then this might be a CGI process and <code>HTTP_PROXY</code> would be set from the <code>Proxy:</code> header, which is a security risk. If <code>REQUEST_METHOD</code> is set, <code>HTTP_PROXY</code> (the upper case variant only) is ignored.</p>

<p>Tunnelling <code>https</code> over an <code>http</code> proxy using the CONNECT method is supported. If your proxy uses <code>https</code> itself, you can not tunnel <code>https</code> over it.</p>

<p>Be warned that proxying an <code>https</code> connection opens you to the risk of a man-in-the-middle attack by the proxy server.</p>

<p>The <code>no_proxy</code> environment variable is supported in the format of a comma-separated list of domain extensions proxy should not be used for.</p>

<p>Proxy arguments passed to <code>new</code> will override their corresponding environment variables.</p>

<h1 id="LIMITATIONS"><a class="permalink" href="./HTTP::Tiny.html#LIMITATIONS">#</a>LIMITATIONS</h1>

<p>HTTP::Tiny is <i>conditionally compliant</i> with the <a href="http://www.w3.org/Protocols/">HTTP/1.1 specifications</a>:</p>

<ul>

<li><p>&quot;Message Syntax and Routing&quot; [RFC7230]</p>

</li>
<li><p>&quot;Semantics and Content&quot; [RFC7231]</p>

</li>
<li><p>&quot;Conditional Requests&quot; [RFC7232]</p>

</li>
<li><p>&quot;Range Requests&quot; [RFC7233]</p>

</li>
<li><p>&quot;Caching&quot; [RFC7234]</p>

</li>
<li><p>&quot;Authentication&quot; [RFC7235]</p>

</li>
</ul>

<p>It attempts to meet all &quot;MUST&quot; requirements of the specification, but does not implement all &quot;SHOULD&quot; requirements. (Note: it was developed against the earlier RFC 2616 specification and may not yet meet the revised RFC 7230-7235 spec.)</p>

<p>Some particular limitations of note include:</p>

<ul>

<li><p>HTTP::Tiny focuses on correct transport. Users are responsible for ensuring that user-defined headers and content are compliant with the HTTP/1.1 specification.</p>

</li>
<li><p>Users must ensure that URLs are properly escaped for unsafe characters and that international domain names are properly encoded to ASCII. See <a href="./URI::Escape.html">URI::Escape</a>, <a href="./URI::_punycode.html">URI::_punycode</a> and <a href="./Net::IDN::Encode.html">Net::IDN::Encode</a>.</p>

</li>
<li><p>Redirection is very strict against the specification. Redirection is only automatic for response codes 301, 302, 307 and 308 if the request method is &#39;GET&#39; or &#39;HEAD&#39;. Response code 303 is always converted into a &#39;GET&#39; redirection, as mandated by the specification. There is no automatic support for status 305 (&quot;Use proxy&quot;) redirections.</p>

</li>
<li><p>There is no provision for delaying a request body using an <code>Expect</code> header. Unexpected <code>1XX</code> responses are silently ignored as per the specification.</p>

</li>
<li><p>Only &#39;chunked&#39; <code>Transfer-Encoding</code> is supported.</p>

</li>
<li><p>There is no support for a Request-URI of &#39;*&#39; for the &#39;OPTIONS&#39; request.</p>

</li>
<li><p>Headers mentioned in the RFCs and some other, well-known headers are generated with their canonical case. Other headers are sent in the case provided by the user. Except for control headers (which are sent first), headers are sent in arbitrary order.</p>

</li>
</ul>

<p>Despite the limitations listed above, HTTP::Tiny is considered feature-complete. New feature requests should be directed to <a href="./HTTP::Tiny::UA.html">HTTP::Tiny::UA</a>.</p>

<h1 id="SEE-ALSO"><a class="permalink" href="./HTTP::Tiny.html#SEE-ALSO">#</a><a id="SEE"></a>SEE ALSO</h1>

<ul>

<li><p><a href="./HTTP::Tiny::UA.html">HTTP::Tiny::UA</a> - Higher level UA features for HTTP::Tiny</p>

</li>
<li><p><a href="./HTTP::Thin.html">HTTP::Thin</a> - HTTP::Tiny wrapper with <a href="./HTTP::Request.html">HTTP::Request</a>/<a href="./HTTP::Response.html">HTTP::Response</a> compatibility</p>

</li>
<li><p><a href="./HTTP::Tiny::Mech.html">HTTP::Tiny::Mech</a> - Wrap <a href="./WWW::Mechanize.html">WWW::Mechanize</a> instance in HTTP::Tiny compatible interface</p>

</li>
<li><p><a href="./IO::Socket::IP.html">IO::Socket::IP</a> - Required for IPv6 support</p>

</li>
<li><p><a href="./IO::Socket::SSL.html">IO::Socket::SSL</a> - Required for SSL support</p>

</li>
<li><p><a href="./LWP::UserAgent.html">LWP::UserAgent</a> - If HTTP::Tiny isn&#39;t enough for you, this is the &quot;standard&quot; way to do things</p>

</li>
<li><p><a href="./Mozilla::CA.html">Mozilla::CA</a> - Required if you want to validate SSL certificates</p>

</li>
<li><p><a href="./Net::SSLeay.html">Net::SSLeay</a> - Required for SSL support</p>

</li>
</ul>

<h1 id="SUPPORT"><a class="permalink" href="./HTTP::Tiny.html#SUPPORT">#</a>SUPPORT</h1>

<h2 id="Bugs-/-Feature-Requests"><a class="permalink" href="./HTTP::Tiny.html#Bugs-/-Feature-Requests">#</a><a id="Bugs"></a><a id="Bugs-Feature-Requests"></a>Bugs / Feature Requests</h2>

<p>Please report any bugs or feature requests through the issue tracker at <a href="https://github.com/chansen/p5-http-tiny/issues">https://github.com/chansen/p5-http-tiny/issues</a>. You will be notified automatically of any progress on your issue.</p>

<h2 id="Source-Code"><a class="permalink" href="./HTTP::Tiny.html#Source-Code">#</a><a id="Source"></a>Source Code</h2>

<p>This is open source software. The code repository is available for public review and contribution under the terms of the license.</p>

<p><a href="https://github.com/chansen/p5-http-tiny">https://github.com/chansen/p5-http-tiny</a></p>

<pre><code class="plaintext">git clone https://github.com/chansen/p5-http-tiny.git</code></pre>

<h1 id="AUTHORS"><a class="permalink" href="./HTTP::Tiny.html#AUTHORS">#</a>AUTHORS</h1>

<ul>

<li><p>Christian Hansen &lt;chansen@cpan.org&gt;</p>

</li>
<li><p>David Golden &lt;dagolden@cpan.org&gt;</p>

</li>
</ul>

<h1 id="CONTRIBUTORS"><a class="permalink" href="./HTTP::Tiny.html#CONTRIBUTORS">#</a>CONTRIBUTORS</h1>

<ul>

<li><p>Alan Gardner &lt;gardner@pythian.com&gt;</p>

</li>
<li><p>Alessandro Ghedini &lt;al3xbio@gmail.com&gt;</p>

</li>
<li><p>A. Sinan Unur &lt;nanis@cpan.org&gt;</p>

</li>
<li><p>Brad Gilbert &lt;bgills@cpan.org&gt;</p>

</li>
<li><p>brian m. carlson &lt;sandals@crustytoothpaste.net&gt;</p>

</li>
<li><p>Chris Nehren &lt;apeiron@cpan.org&gt;</p>

</li>
<li><p>Chris Weyl &lt;cweyl@alumni.drew.edu&gt;</p>

</li>
<li><p>Claes Jakobsson &lt;claes@surfar.nu&gt;</p>

</li>
<li><p>Clinton Gormley &lt;clint@traveljury.com&gt;</p>

</li>
<li><p>Craig A. Berry &lt;craigberry@mac.com&gt;</p>

</li>
<li><p>Craig Berry &lt;cberry@cpan.org&gt;</p>

</li>
<li><p>David Golden &lt;xdg@xdg.me&gt;</p>

</li>
<li><p>David Mitchell &lt;davem@iabyn.com&gt;</p>

</li>
<li><p>Dean Pearce &lt;pearce@pythian.com&gt;</p>

</li>
<li><p>Edward Zborowski &lt;ed@rubensteintech.com&gt;</p>

</li>
<li><p>Felipe Gasper &lt;felipe@felipegasper.com&gt;</p>

</li>
<li><p>James Raspass &lt;jraspass@gmail.com&gt;</p>

</li>
<li><p>Jeremy Mates &lt;jmates@cpan.org&gt;</p>

</li>
<li><p>Jess Robinson &lt;castaway@desert-island.me.uk&gt;</p>

</li>
<li><p>Karen Etheridge &lt;ether@cpan.org&gt;</p>

</li>
<li><p>Lukas Eklund &lt;leklund@gmail.com&gt;</p>

</li>
<li><p>Martin J. Evans &lt;mjegh@ntlworld.com&gt;</p>

</li>
<li><p>Martin-Louis Bright &lt;mlbright@gmail.com&gt;</p>

</li>
<li><p>Mike Doherty &lt;doherty@cpan.org&gt;</p>

</li>
<li><p>Nicolas Rochelemagne &lt;rochelemagne@cpanel.net&gt;</p>

</li>
<li><p>Olaf Alders &lt;olaf@wundersolutions.com&gt;</p>

</li>
<li><p>Olivier Mengué &lt;dolmen@cpan.org&gt;</p>

</li>
<li><p>Petr Písař &lt;ppisar@redhat.com&gt;</p>

</li>
<li><p>Serguei Trouchelle &lt;stro@cpan.org&gt;</p>

</li>
<li><p>Shoichi Kaji &lt;skaji@cpan.org&gt;</p>

</li>
<li><p>SkyMarshal &lt;skymarshal1729@gmail.com&gt;</p>

</li>
<li><p>Sören Kornetzki &lt;soeren.kornetzki@delti.com&gt;</p>

</li>
<li><p>Steve Grazzini &lt;steve.grazzini@grantstreet.com&gt;</p>

</li>
<li><p>Syohei YOSHIDA &lt;syohex@gmail.com&gt;</p>

</li>
<li><p>Tatsuhiko Miyagawa &lt;miyagawa@bulknews.net&gt;</p>

</li>
<li><p>Tom Hukins &lt;tom@eborcom.com&gt;</p>

</li>
<li><p>Tony Cook &lt;tony@develop-help.com&gt;</p>

</li>
</ul>

<h1 id="COPYRIGHT-AND-LICENSE"><a class="permalink" href="./HTTP::Tiny.html#COPYRIGHT-AND-LICENSE">#</a><a id="COPYRIGHT"></a>COPYRIGHT AND LICENSE</h1>

<p>This software is copyright (c) 2018 by Christian Hansen.</p>

<p>This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.</p>


      </div>
      <div id="footer">
        <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p>

<p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p>


      </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
    <script src="../highlight.pack.js"></script>
    <script>hljs.highlightAll();</script>
  </body>
</html>
